﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Data;
using System.Data.Objects;
using ICDA.Models.Entity;

namespace ICDA.Models
{
    public interface IRepository
    {
        IObjectSet<UserTable> users { get; }

        IObjectSet<ActivityTable> activity { get; }
        IObjectSet<LeaveTable> leavetable { get; }

        void Save<TModel>(TModel data);
        void Save<TModel>(List<TModel> data);
        void Delete<TModel>(TModel data);
        ObjectQuery<TModel> Select<TModel>(string query, params ObjectParameter[] parameters);
        bool SaveChanges();
        bool AddTask(ActivityTable actTable);
        bool DeleteTask(ActivityTable actTable);
        bool UpdateUser(UserTable user);
        bool ChangePassword(UserTable user);
        bool AddLeave(LeaveTable leaveT);
        bool DeleteLeave(LeaveTable leaveT);
    }
}
